package com.aero.cojbackendcommentservice.service;


import com.aero.cojbackendmodel.model.dto.reply.ReplyQueryRequest;
import com.aero.cojbackendmodel.model.entity.Reply;
import com.aero.cojbackendmodel.model.vo.ReplyVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
* @author Aero
* @description 针对表【reply(题目)】的数据库操作Service
*/
public interface ReplyService extends IService<Reply> {


    /**
     * 校验
     *
     * @param reply
     * @param add
     */
    void validReply(Reply reply, boolean add);

    /**
     * 获取查询条件
     *
     * @param replyQueryRequest
     * @return
     */
    QueryWrapper<Reply> getQueryWrapper(ReplyQueryRequest replyQueryRequest);
    
    /**
     * 获取题目封装
     *
     * @param reply
     * @param request
     * @return
     */
    ReplyVO getReplyVO(Reply reply, HttpServletRequest request);

    /**
     * 分页获取题目封装
     *
     * @param replyPage
     * @param request
     * @return
     */
    Page<ReplyVO> getReplyVOPage(Page<Reply> replyPage, HttpServletRequest request);

    
}
